package com.example.userbehaviorprediction;

import static android.content.ContentValues.TAG;

import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;

import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;
import android.widget.Toast;


public class frag3 extends Fragment{
    Button btn1;
    ImageButton btn2;
    ImageButton btn3;
    private FragmentManager manager;
    private frag3 fragment;

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return inflater.inflate(R.layout.frag3,container,false);


    }


    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        btn1=(Button) getActivity().findViewById(R.id.textbutton);
        btn2=getActivity().findViewById(R.id.imagebutton1);
        btn3=getActivity().findViewById(R.id.imagebutton2);
        btn1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View arg0) {
                Log.e(TAG, "onClick: asdasdasd" );

                new AlertDialog.Builder(getActivity())
                        .setTitle("我们是")
                        .setMessage("科软andriod实验第17组")
                        .setPositiveButton("知道了", null)
                        .show();

            }
        });

        btn2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View arg0) {
                Log.e(TAG, "onClick: asdasdasd" );

                new AlertDialog.Builder(getActivity())
                        .setTitle("组员")
                        .setMessage("SA21225289李远哲\nSA21225282李阳\nSA21225235江镇武\nSA21225140陈子田")
                        .setPositiveButton("ok", null)
                        .show();

            }
        });

        btn3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View arg0) {
                Log.e(TAG, "onClick: asdasdasd" );

                new AlertDialog.Builder(getActivity())
                        .setTitle("群号")
                        .setMessage("750520516")
                        .setPositiveButton("加群", null)
                        .show();

            }
        });
    }

}

